package com.ruoyi;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 create database `ry-order-master`;
 create database `ry-order-slave1`;
 create database `ry-order-slave2`;
 -- ----------------------------
 -- ----------------------------
 DROP TABLE IF EXISTS `sys_order`;
 CREATE TABLE `sys_order`  (
 `order_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '订单ID',
 `user_id` bigint(64) NOT NULL COMMENT '用户编号',
 `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '状态（0交易成功 1交易失败）',
 `order_no` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单流水',
 PRIMARY KEY (`order_id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单信息表' ROW_FORMAT = Dynamic;


 订单的读写分离
 */
@SpringBootApplication
@MapperScan("com.ruoyi.order.mapper")
public class OrderMasterSlaveApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderMasterSlaveApplication.class,args);
    }
}
